obj-m += cpuregs.o
cpuregs-objs := module.o mfspr_table.o mfdcr_table.o

all:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
	gcc -Wall -o registers registers.c

clean:
	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
	rm registers

test:
	@sudo insmod ./cpuregs.ko
	@sleep 1
	@sudo ./registers
	@sudo rmmod cpuregs

